package design2.state.example.demo1;

import design2.state.example.demo1.activity.ActivityExecStatusController;
import design2.state.example.demo1.activity.ActivityService;
import design2.state.example.demo1.activity.Result;
import design2.state.example.demo1.activity.Status;

public class Demo {
    public static void main(String[] args) {
            //初始化数据
        String activityId="100001";

        ActivityService.init(activityId, Status.Editing);

        ActivityExecStatusController activityExecStatusController=new ActivityExecStatusController();
        Result result=activityExecStatusController.execStatus(activityId,Status.Editing,Status.Refuse);

        System.out.println(result.toString());

         result=activityExecStatusController.execStatus(activityId,Status.Editing,Status.Check);

        System.out.println(result.toString());
    }
}
